# coding=utf-8
import maya.cmds as cmds

def Sync_Pipeline():
	Sync_PipelineName = (u"管理工具")#SyncPipeline
	if cmds.workspaceControl("AttributeEditor",q=1, exists=1):
		if cmds.workspaceControl(Sync_PipelineName,q=1, exists=1):
			cmds.deleteUI(Sync_PipelineName)
	cmds.workspaceControl(Sync_PipelineName, visible =1,label=Sync_PipelineName,tabPosition=("east",1),tabToControl=("AttributeEditor", -1),retain=1,collapse = 0,initialWidth=300,initialHeight=50,minimumWidth=300,minimumHeight=50)

def Tools_Pipeline():
	Tools_PipelineName = (u"部门工具")#ToolsPipeline
	if cmds.workspaceControl("AttributeEditor",q=1, exists=1):
		if cmds.workspaceControl(Tools_PipelineName,q=1, exists=1):
			cmds.deleteUI(Tools_PipelineName)
	cmds.workspaceControl(Tools_PipelineName, visible =1,label = Tools_PipelineName,tabPosition = ("east",1),tabToControl=("AttributeEditor", -1),retain=1,collapse = 0,initialWidth=300,initialHeight=50,minimumWidth=300,minimumHeight=50)

def Check_Pipeline():
	Check_PipelineName = (u"检查工具")#CheckPipeline
	if cmds.workspaceControl("AttributeEditor",q=1, exists=1):
		if cmds.workspaceControl(Check_PipelineName,q=1, exists=1):
			cmds.deleteUI(Check_PipelineName)
	cmds.workspaceControl(Check_PipelineName, visible =1,label = Check_PipelineName,tabPosition = ("east",1),tabToControl=("AttributeEditor", -1),retain=1,collapse = 0,initialWidth=300,initialHeight=50,minimumWidth=300,minimumHeight=50)	

def Setting_Pipeline():
	Check_PipelineName = (u"设置")#CheckPipeline
	if cmds.workspaceControl("AttributeEditor",q=1, exists=1):
		if cmds.workspaceControl(Check_PipelineName,q=1, exists=1):
			cmds.deleteUI(Check_PipelineName)
	cmds.workspaceControl(Check_PipelineName, visible =1,label = Check_PipelineName,tabPosition = ("east",1),tabToControl=("AttributeEditor", -1),retain=1,collapse = 0,initialWidth=300,initialHeight=50,minimumWidth=300,minimumHeight=50)	

def chineseTounicode(str):
	chinese_str = str
	unicode_str = chinese_str.encode("unicode_escape")
	return(unicode_str)